<?php
$fp=fopen("test.txt",w)or exit("khong tim thay file can mo");
$news="# boardsize 3 x 3";
fwrite($fp,$news);
while(!feof($fp))
{
    echo fgets($fp). "<br>";
}
fclose($fp);
?>